#! /bin/sh
sed -i "s/git.openwrt.org\/openwrt/gitee.com\/blackKnife/g" feeds.conf.default 
sed -i "s/git.openwrt.org\/feed/gitee.com\/blackKnife/g" feeds.conf.default
sed -i "s/git.openwrt.org\/project/gitee.com\/blackKnife/g" feeds.conf.default

sed -i '/src-git passwall https://github.com/xiaorouji/openwrt-passwall.git/d' feeds.conf.default
sed -i '/src-git iptv https://github.com/riverscn/openwrt-iptvhelper.git/d' feeds.conf.default
sed -i '/src-git my https://gitee.com/blackKnife/my.git/d' feeds.conf.default
sed -i '$a src-git passwall https://github.com/xiaorouji/openwrt-passwall.git' feeds.conf.default
sed -i '$a src-git iptv https://github.com/riverscn/openwrt-iptvhelper.git' feeds.conf.default
sed -i '$a src-git my https://gitee.com/blackKnife/my.git' feeds.conf.default

#add ucl and upx tools Makefile
sed -i "/tools-y += ucl upx/d" tools/Makefile
sed -i "/\$\(curdir\)\/upx\/compile := \$\(curdir\)\/ucl\/compile/d" tools/Makefile
sed -i "/tools-y += patchelf pkgconf quilt squashfskit4 sstrip xxd zip zlib zstd/a tools-y += ucl upx\n\$(curdir)\/upx\/compile := \$(curdir)\/ucl\/compile\n" tools/Makefile